package com.lvmama.controller.rhino.active;

import com.lvmama.client.rhino.ActiveClient;
import com.lvmama.client.rhino.VisitorClient;
import com.lvmama.common.result.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;

@Controller
@RequestMapping("/activeUser")
public class ActiveUserController {

    @Autowired
    ActiveClient activeClient;


    @RequestMapping(value = "/activeUserAnalysis",method = RequestMethod.GET)
    public String visitorsAnalysis(ModelMap model) {
        return "rhino/active/activeUserAnalysis";
    }

    @RequestMapping(value = "/activeUserChartData",method = RequestMethod.POST)
    @ResponseBody
    public Result<Map<String, Object>> visitorChartData(String chooseTime) {
        return activeClient.visitorChartData(chooseTime);
    }


}
